<template>
	<view class="form-item">
		<view class="form-label">
			<uni-icons :type="icon" size="16" color="#666"></uni-icons>
			<text>{{ label }}</text>
		</view>

		<!-- 电话类型特殊处理 -->
		<view v-if="type === 'phone'" @tap="handlePhoneClick" class="text-value phone">
			{{ value || '无' }}
		</view>

		<!-- 普通文本类型 -->
		<text v-else class="text-value">{{ value || '无' }}</text>
	</view>
</template>

<script>
	export default {
		props: {
			label: String,
			value: [String, Number],
			icon: String,
			type: String
		},
		methods: {
			handlePhoneClick() {
				this.$emit('phone-click', this.value);
			}
		}
	}
</script>